//
//  InheritArrayList.swift
//  ArchitectGenerics
//
//  Created by 姚胜龙 on 2017/6/5.
//  Copyright © 2017年 姚胜龙. All rights reserved.
//

import UIKit

class InheritArrayList<T>: SLIArray {

    typealias TypeArray = T

    var array = Array<T>()

    func add(obj:T) {
        self.array.append(obj)
    }
    func remove(index:Int){
        self.array.remove(at: index)
    }
    func get(index:Int) -> T? {
        return self.array[index]
    }
    func removeAll(){
        print("删除全部")
        self.array.removeAll()
    }
    func forEach(){
        for item in self.array {
            print(item)
        }
    }
}
